-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/surveys #170
base: main
Are you sure you want to change the base?
Feat/surveys #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great start! Let me know when you have a chance to work through the changes I mentioned in surveyUtils.js, and I'll continue reviewing!
src/components/stops/StopPane.svelte
Outdated
@@ -114,6 +161,44 @@ | |||
</div> | |||
</div> | |||
</div> | |||
{#if showHeroQuestion && currentStopSurvey} | |||
<div class="hero-question-container relative rounded-lg bg-gray-50 p-6 shadow"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please extract the content inside of the {#if}
into a new component.
src/lib/Surveys/surveyUtils.js
Outdated
const now = new Date(); | ||
return surveys.filter( | ||
(survey) => | ||
new Date(survey.end_date) > now && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's valid for a survey to not have an end date, which makes it not appear on-screen as this filters it out as being invalid.
@@ -0,0 +1,121 @@ | |||
import { showSurveyModal, surveyStore } from '$stores/surveyStore.js'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write a couple basic unit tests for each of the functions in this file. That will help us ensure that there are no regressions going forward, and that we're all on the same page with regard to product behavior.
Hi @aaronbrethorst, You can continue reviewing now! |
Fixes: #160